<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>利用率</title>
    <meta name="decorator" content="default"/>
    <script>
        function clean(){
            $("#begin").val("");
            $("#end").val("");
        }
    </script>
</head>
<body>
<form:form id="searchForm" action="${ctx}/statistics/use" method="post" class="breadcrumb form-search">
    <ul class="ul-form">
        <li>
            <label style="width: 180px;">请输入起始日期：</label>

            <input id="begin"
                   name="begin"
                   class="input-medium Wdate"
                   readonly="readonly"
                   maxlength="20"
                   type="text"
                   value="${begin}"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});">
            ——
            <input id="end"
                   name="end"
                   class="input-medium Wdate"
                   readonly="readonly"
                   maxlength="20"
                   type="text"
                   value="${end}"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});">

        </li>
        <li style="margin-left: 20px;">
            <input id="btnSubmit" class="btn btn-primary" type="submit" value="统计"/>&nbsp;&nbsp;
            <a href="javascript:clean();" class="btn">清空</a>
        </li>
    </ul>

</form:form>
<sys:message content="${message}"/>
<div id="contentTable">
    <div style="margin-left:80px; ">
        <label>藏书利用率：</label>
        <input id="bookIsbn" name="isbn" type="text" value="${use}" class="required valid tab_b" style="width: 50px;" />%
    </div>
    <table class="table table-striped table-bordered table-condensed" style="width: 900px;">
        <thead>
        <tr>
            <th></th>
            <th>分类馆藏总数(本)</th>
            <th>分类借阅总数(本)</th>
            <th>分类借阅读者数(人)</th>
        </tr>
        </thead>
        <tbody>
            <c:forEach items="${total}" var="item" varStatus="status">
                <tr>
                        <td style="text-align: right;">${item.key}</td>
                        <td style="text-align: right;"><c:out value="${item.value.total}"/></td>
                        <td style="text-align: right;"><c:out value="${empty item.value.book?0:item.value.book}"/></td>
                        <td style="text-align: right;"><c:out value="${empty item.value.reader?0:item.value.reader}"/></td>
                </tr>
            </c:forEach>
        </tbody>
    </table>
</div>
</body>
</html>